package com.yupi.longojbackendjudgeservice.judge.codesandbox;


import com.yupi.longojbackendmodel.codesandbox.ExecuteCodeRequest;
import com.yupi.longojbackendmodel.codesandbox.ExecuteCodeResponse;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class CodeSandboxProxy implements CodeSandbox{
    private  final CodeSandbox codeSandbox;
    public CodeSandboxProxy(CodeSandbox codeSandbox) {this.codeSandbox = codeSandbox;}
    @Override
    public ExecuteCodeResponse excuteCode(ExecuteCodeRequest executeCodeRequest) {
        log.info("代码沙箱请求信息："+ executeCodeRequest.toString());
        ExecuteCodeResponse executeCodeResponse=codeSandbox.excuteCode( executeCodeRequest);
        log.info("代码沙箱响应信息："+ executeCodeResponse.toString());
        return executeCodeResponse;
    }
}
